package cn.nexd.location.utils;

import java.io.File;

/**
 * Created by codngfish on 15/11/19.
 */
public final class Command {
    private static String NEXD_BASE_FILE_PATH = "/storage/emulated/0/nexd";
    public static final String NEXD_MAP_FILE_PATH = NEXD_BASE_FILE_PATH + File.separator + "map";
    public static final String MAP_FILE_CONFIG_NAME = "config.json";

    public static String getFloorDetectionConfigPath(long buildingId) {
        return new StringBuilder().append(NEXD_MAP_FILE_PATH).append(File.separator).append(buildingId).append(File.separator).append(buildingId).toString();
    }

    public static String getNexdBaseFilePath(long buildingId) {
        return new StringBuilder().append(NEXD_BASE_FILE_PATH).append(File.separator).toString();
    }

    public static String getNexdLocationFilePath(long buildingId) {
        return new StringBuilder().append(NEXD_BASE_FILE_PATH).append(File.separator).append("location").append(File.separator).append(buildingId).append(File.separator).toString();
    }

    public static String getLocationConfigPath(long buildingId, long floorId) {
        return new StringBuilder().append(NEXD_MAP_FILE_PATH).append(File.separator).append(buildingId).append(File.separator).append(floorId).toString();
    }

    public static void setNexdBaseFilePath(String nexdBaseFilePath) {
        NEXD_BASE_FILE_PATH = nexdBaseFilePath;
    }
}
